import 'package:flutter/material.dart';

class ContainerCase2 extends StatelessWidget {
const ContainerCase2({ Key? key }) : super(key: key);

  @override
  Widget build(BuildContext context){
    return Container(
      width: double.infinity,
      height: double.infinity,
      color: Colors.black26,
      alignment: Alignment.center, // 想要子元素不充满全屏 需要设置对齐方式
      child: Container(
        width: 300,
        height: 300,
        color: Colors.orange,
      ),
    );
  }
}